package com.paw.common.domain;

import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Rubble
 * @date 2021/8/14
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "AntDesign ProTable返回分页对象")
public class ProTableResponse<T> implements Serializable {

  @ApiModelProperty(value = "页码")
  @JsonSerialize(using = ToStringSerializer.class)
  private long current = 1L;

  @ApiModelProperty(value = "分页大小")
  @JsonSerialize(using = ToStringSerializer.class)
  private long pageSize = 10L;

  @ApiModelProperty("成功")
  private Boolean success = true;

  @ApiModelProperty("总记录数")
  @JsonSerialize(using = ToStringSerializer.class)
  private long total;

  @ApiModelProperty("记录列表")
  private List<T> data;

}
